package com.our.biz;


import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;


import org.springframework.stereotype.Service;

import com.our.dao.UserProMapper;
import com.our.model.UserPro;


@Service
public class userProBiz {
	@Resource
	private UserProMapper dao;
	
	public void save(UserPro up){
		dao.insert(up);
	}
	public List<UserPro> findByUserId(int userId){
		return dao.selectByUserId(userId);
	}
	public void updateState(){
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		dao.updateStatement(sdf.format(new Date()));
	}
	public List<UserPro> findByProId(int proId){
		return dao.selectByProId(proId);
	}
}

